package cc.vv.btpartyjob.partyservice.adapter

import android.widget.TextView
import cc.vv.baselibrary.adapter.SimpleCommonAdapter
import cc.vv.baselibrary.adapter.holder.ExtendViewHolder
import cc.vv.baselibrary.view.LKCircleImageView
import cc.vv.btpartyjob.partyservice.R
import cc.vv.btpartyjob.partyservice.module.bean.LiuYanHuiFuListBean
import cc.vv.lkimagecomponent2.LKImage

/**
 * 留言板adapter
 * Created by Chen.qi on 2018/10/24.
 */
class LiuYanBanDetailAdapter(layoutResId: Int) : SimpleCommonAdapter<LiuYanHuiFuListBean>(layoutResId) {
    override fun convert(helper: ExtendViewHolder, item: LiuYanHuiFuListBean, position: Int) {
        val headImg = helper.getView<LKCircleImageView>(R.id.lkv_llhH_img)
        val tvName = helper.getView<TextView>(R.id.tv_llhH_name)
        LKImage.load().placeHolder(R.mipmap.icon_def_image)
                .error(R.mipmap.icon_def_image).load(item.faceUrl).into(headImg)
        tvName?.text = item.name
        helper.getView<TextView>(R.id.tv_llhH_itemDesc)?.text = item.content
    }
}